#define _CRT_SECURE_NO_WARNINGS

#include"heap.h"

void test()
{
	Heap hp;
	HeapInit(&hp);
	HeapPush(&hp, 1);
	HeapPush(&hp, 2);
	HeapPush(&hp, 3);
	HeapPush(&hp, 6);
	HeapPush(&hp, 4);
	HeapPush(&hp, 5);

	HeapPop(&hp);

	printf("top:%d\n", HeapTop(&hp));
	printf("size:%d\n", HeapSize(&hp));
	HeapDestory(&hp);
}

void test1()
{
	Heap hp;
	HPDataType a[10] = { 0,7,10,1,4,5,7,6,1,8 };
	HeapInitArray(&hp, a, sizeof(a)/sizeof(HPDataType));
	HeapSort(a, sizeof(a) / sizeof(HPDataType));
}

int main()
{
	test();
	test1();
	return 0;
}